﻿Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Net.Mail
Public Module SeussMail
    Public Sub EnviaMail(ByVal Mail As String, ByVal Subject As String, ByVal Mensaje As String, ByVal From As String, ByVal cPerCodigo As String)
        Try

            Dim obj As New System.Net.Mail.SmtpClient
            Dim Vmensaje As New System.Net.Mail.MailMessage
            'Dim cBodyMessage As String = ""
            Dim cLey As String = ""
            'Dim param As String = ""
            Vmensaje.From = New System.Net.Mail.MailAddress(From) 'Bolsa de Trabajo UCV <bolsadetrabajo@ucv.edu.pe>
            Vmensaje.To.Add(Mail)
            Vmensaje.Subject = Subject
            Vmensaje.IsBodyHtml = True
            Vmensaje.Body = Mensaje
            Vmensaje.Priority = MailPriority.Normal

            obj.Host = "172.16.16.6"
            obj.Port = 25
            obj.Credentials = New Net.NetworkCredential("seuss@ucvchimbote.edu.pe", "ElMeroLoco")
            obj.Send(Vmensaje)

            'cBodyMessage = Mensaje
            'param = "c=" & cPerCodigo & "&m= seuss@ucvchimbote.edu.pe"
            'param = Seuss.EnterpriseLibrary.Security.Cryptography.StringEncryption.QueryStringModule.Encrypt(param)
            'obj.Host = "192.168.105.253"

        Catch ex As Exception

        End Try

    End Sub

End Module
